<?php

if (!defined('BASEPATH'))
	exit('No direct script access allowed');

/**
 * Init Model
 *
 */


class Static_model extends CI_Model {

	function __construct(){
		parent::__construct();
	}
	
	
	function getPage($id=0){
		$sql = "Select * from cms where id=$id limit 1";
		$row = $this->db->query($sql)->row();
		if ($row){
			return $row;
		}else{
			return false;
		}
			
	}
	
	
	
	function showPage($pos=0){
		$sql = "select id,title,url from cms where status=51 and position = $pos";
		$result = $this->db->query($sql)->result();
		
		if ($result){
			return $result;
		} else {
			return false;
		}
	}
	
	
}
/* End of file*/
